//获取 二级分类列表
import request from "@/utils/request";

//Category分类页面  获取全部分类的数据
export const reqGetCategory = (id) => {
  return request({
    url: "/category",
    // 不管是params还是query传递参数这里仍然使用 params 传递 id,
    params: { id },
  });
};
//获取二级分类列表数据
export const reqSubCategory = (id) => {
  return request({
    url: "/category/sub/filter",
    params: {
      id,
    },
  });
};
/**
 *@description:获取导航数据
 * @param {
 *  categoryId:1005000,
 *  page:1,
 *  pageSize:20,
 *  sortField:'publishTime|orderNum|evaluateNum'
 * }
 *
 * @returns {*}
 */
export const reqSubGoodList = (data) => {
  return request({
    url: "/category/goods/temporary",
    method: "POST",
    data,
  });
};
